Optimal. Leaf size=84 \[ \frac{(f+g x)^{n+1} \left (a g^2+c f (e f-2 d g)\right )}{g^3 (n+1)}-\frac{2 c (e f-d g) (f+g x)^{n+2}}{g^3 (n+2)}+\frac{c e (f+g x)^{n+3}}{g^3 (n+3)} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.121457, antiderivative size = 84, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.048 \[ \frac{(f+g x)^{n+1} \left (a g^2+c f (e f-2 d g)\right )}{g^3 (n+1)}-\frac{2 c (e f-d g) (f+g x)^{n+2}}{g^3 (n+2)}+\frac{c e (f+g x)^{n+3}}{g^3 (n+3)} \]
Antiderivative was successfully verified.
[In] Int[(f + g*x)^n*(a + 2*c*d*x + c*e*x^2),x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 25.7388, size = 78, normalized size = 0.93 \[ \frac{c e \left (f + g x\right )^{n + 3}}{g^{3} \left (n + 3\right )} + \frac{2 c \left (f + g x\right )^{n + 2} \left (d g - e f\right )}{g^{3} \left (n + 2\right )} + \frac{\left (f + g x\right )^{n + 1} \left (a g^{2} - 2 c d f g + c e f^{2}\right )}{g^{3} \left (n + 1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((g*x+f)**n*(c*e*x**2+2*c*d*x+a),x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.115003, size = 92, normalized size = 1.1 \[ \frac{(f+g x)^{n+1} \left (a g^2 \left (n^2+5 n+6\right )+2 c d g (n+3) (g (n+1) x-f)+c e \left (2 f^2-2 f g (n+1) x+g^2 \left (n^2+3 n+2\right ) x^2\right )\right )}{g^3 (n+1) (n+2) (n+3)} \]
Antiderivative was successfully verified.
[In] Integrate[(f + g*x)^n*(a + 2*c*d*x + c*e*x^2),x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.007, size = 147, normalized size = 1.8 \[{\frac{ \left ( gx+f \right ) ^{1+n} \left ( ce{g}^{2}{n}^{2}{x}^{2}+2\,cd{g}^{2}{n}^{2}x+3\,ce{g}^{2}n{x}^{2}+8\,cd{g}^{2}nx-2\,cefgnx+2\,ce{x}^{2}{g}^{2}+a{g}^{2}{n}^{2}-2\,cdfgn+6\,cd{g}^{2}x-2\,cefgx+5\,a{g}^{2}n-6\,cdfg+2\,ce{f}^{2}+6\,a{g}^{2} \right ) }{{g}^{3} \left ({n}^{3}+6\,{n}^{2}+11\,n+6 \right ) }} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((g*x+f)^n*(c*e*x^2+2*c*d*x+a),x)
[Out]
_______________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((c*e*x^2 + 2*c*d*x + a)*(g*x + f)^n,x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.294048, size = 294, normalized size = 3.5 \[ \frac{{\left (a f g^{2} n^{2} + 2 \, c e f^{3} - 6 \, c d f^{2} g + 6 \, a f g^{2} +{\left (c e g^{3} n^{2} + 3 \, c e g^{3} n + 2 \, c e g^{3}\right )} x^{3} +{\left (6 \, c d g^{3} +{\left (c e f g^{2} + 2 \, c d g^{3}\right )} n^{2} +{\left (c e f g^{2} + 8 \, c d g^{3}\right )} n\right )} x^{2} -{\left (2 \, c d f^{2} g - 5 \, a f g^{2}\right )} n +{\left (6 \, a g^{3} +{\left (2 \, c d f g^{2} + a g^{3}\right )} n^{2} -{\left (2 \, c e f^{2} g - 6 \, c d f g^{2} - 5 \, a g^{3}\right )} n\right )} x\right )}{\left (g x + f\right )}^{n}}{g^{3} n^{3} + 6 \, g^{3} n^{2} + 11 \, g^{3} n + 6 \, g^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((c*e*x^2 + 2*c*d*x + a)*(g*x + f)^n,x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [A] time = 6.11464, size = 1530, normalized size = 18.21 \[ \text{result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((g*x+f)**n*(c*e*x**2+2*c*d*x+a),x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.267371, size = 558, normalized size = 6.64 \[ \frac{c g^{3} n^{2} x^{3} e^{\left (n{\rm ln}\left (g x + f\right ) + 1\right )} + 2 \, c d g^{3} n^{2} x^{2} e^{\left (n{\rm ln}\left (g x + f\right )\right )} + c f g^{2} n^{2} x^{2} e^{\left (n{\rm ln}\left (g x + f\right ) + 1\right )} + 3 \, c g^{3} n x^{3} e^{\left (n{\rm ln}\left (g x + f\right ) + 1\right )} + 2 \, c d f g^{2} n^{2} x e^{\left (n{\rm ln}\left (g x + f\right )\right )} + 8 \, c d g^{3} n x^{2} e^{\left (n{\rm ln}\left (g x + f\right )\right )} + c f g^{2} n x^{2} e^{\left (n{\rm ln}\left (g x + f\right ) + 1\right )} + 2 \, c g^{3} x^{3} e^{\left (n{\rm ln}\left (g x + f\right ) + 1\right )} + 6 \, c d f g^{2} n x e^{\left (n{\rm ln}\left (g x + f\right )\right )} + a g^{3} n^{2} x e^{\left (n{\rm ln}\left (g x + f\right )\right )} + 6 \, c d g^{3} x^{2} e^{\left (n{\rm ln}\left (g x + f\right )\right )} - 2 \, c f^{2} g n x e^{\left (n{\rm ln}\left (g x + f\right ) + 1\right )} - 2 \, c d f^{2} g n e^{\left (n{\rm ln}\left (g x + f\right )\right )} + a f g^{2} n^{2} e^{\left (n{\rm ln}\left (g x + f\right )\right )} + 5 \, a g^{3} n x e^{\left (n{\rm ln}\left (g x + f\right )\right )} - 6 \, c d f^{2} g e^{\left (n{\rm ln}\left (g x + f\right )\right )} + 5 \, a f g^{2} n e^{\left (n{\rm ln}\left (g x + f\right )\right )} + 6 \, a g^{3} x e^{\left (n{\rm ln}\left (g x + f\right )\right )} + 2 \, c f^{3} e^{\left (n{\rm ln}\left (g x + f\right ) + 1\right )} + 6 \, a f g^{2} e^{\left (n{\rm ln}\left (g x + f\right )\right )}}{g^{3} n^{3} + 6 \, g^{3} n^{2} + 11 \, g^{3} n + 6 \, g^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((c*e*x^2 + 2*c*d*x + a)*(g*x + f)^n,x, algorithm="giac")
[Out]